import request from "../utils/request";

export default{
    search(page,size,searchMap){
        return request({
            url:`/staff/findPageAndCountSta/${page}/${size}`,
            method:'post',
            data:searchMap
        })
    },
    add(staff){
        return request({
            url:`/staff/staff`,
            method:'post',
            data:staff
        })
    },
    getById(id){
        return request({
            url:`/staff/${id}`,
            method:'get'
        })
    },
    update(staff){
        return request({
            url:'/staff/staff',
            method:'post',
            data:staff
        })
    },
    deleteById(id){
        return request({
            url:`/staff/${id}`,
            method:'delete'
        })
    }
}